# 读取文本
poetry_file = '../data/poems.txt'
poetrys = []
with open(poetry_file, 'r', encoding='utf-8') as f:
    for line in f:
        try:
            title, content = line.strip().split(':')
            if '_' in content or '(' in content or '（' in content or '《' in content or '[' in content:
                continue
            if len(content) < 5 or len(content) > 79:
                continue
            content = 'B' + content + 'E'
            poetrys.append(content)
        except Exception as e:
            pass
    print(poetrys[0])
